from django.db import models

class Computer(models.Model):
    comp_ID = models.CharField(max_length=10)
    comp_Status = models.CharField(max_length=50)
    comp_Fixcount = models.CharField(max_length=50)

    def __unicode__(self):
        return u'%s' % (self.comp_ID)

class Request(models.Model):
    request_ID = models.AutoField(primary_key=True)
    request_Date = models.CharField(max_length=10)
    request_Time = models.CharField(max_length=10)
    request_Com_ID = models.CharField(max_length=10)
    requset_ComProb = models.CharField(max_length=10)
    request_Status = models.CharField(max_length=10)
    def __unicode__(self):
        return u'Inform %s @ %s %s' % (self.request_ID,self.request_Date, self.request_Time)

class Userguest(models.Model):
    guest_ID = models.CharField(max_length=6)
    guest_Password = models.CharField(max_length=30)
    guest_Name = models.CharField(max_length=30)
    guest_Email = models.EmailField(blank=True)
    
    def __unicode__(self):
        return self.guest_ID


class Fixer(models.Model):
    fixer_ID = models.CharField(max_length=10)
    fixer_Password = models.CharField(max_length=30)
    fixer_Name = models.CharField(max_length=30)
    fixer_Email = models.EmailField(blank=True)

    def __unicode__(self):
        return self.fixer_Name

class History(models.Model):
    his_Date = models.DateField()
    his_Time = models.CharField(max_length=10)
    his_ComID = models.CharField(max_length=10)
    his_Fixer = models.CharField(max_length=10)
    def __unicode__(self):
        return u'%s_%s' %(self.id,self.his_ComID)
